//
//  TravelStrokeBigModel.m
//  ToWhere
//
//  Created by dllo on 15/11/17.
//  Copyright © 2015年 www.TE.com. All rights reserved.
//

#import "TravelStrokeBigModel.h"
#import "TravelStrokeMiddleModel.h"


@implementation TravelStrokeBigModel

-(void)dealloc
{
    [_DES release];
    [_ID release];
    [_image_url release];
    [_name release];
    [_arr release];
    
    [super dealloc];
    
}
-(instancetype)initWithNSDictionary:(NSDictionary *)dic
{
    self = [super init];
    if (self) {
        
        self.arr = [NSMutableArray array];
        [self setValuesForKeysWithDictionary:dic];
    }
    
    return self;
    
}

+(TravelStrokeBigModel *)travelStrokeBigModelWithNSDictionary:(NSDictionary *)dic
{
    TravelStrokeBigModel *model = [[TravelStrokeBigModel alloc]initWithNSDictionary:dic];
    return [model autorelease];
    
}

-(void)setValue:(id)value forUndefinedKey:(NSString *)key
{
    if ([key isEqualToString:@"id"]) {
        self.ID = value;
        }
    
    if ( [key isEqualToString:@"description"]) {
        self.DES = value;
    }
    if ([key isEqualToString:@"plan_days"]) {
        
        NSArray *arrayM = value;
        
        for (NSDictionary *dic in arrayM) {
            
            TravelStrokeMiddleModel *ModdleModel = [TravelStrokeMiddleModel travelStrokeMiddleModelWithNSDictionary:dic];
            [self.arr addObject:ModdleModel];
        }
    
    }
    
}

@end
